package com.property.demo.service;

import com.property.demo.model.ParkingUsage;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface ParkingUsageService {
    
    // 基本CRUD操作
    List<ParkingUsage> findAll();
    
    Page<ParkingUsage> findAll(Pageable pageable);
    
    ParkingUsage findById(Long id);
    
    ParkingUsage save(ParkingUsage parkingUsage);
    
    ParkingUsage update(Long id, ParkingUsage parkingUsage);
    
    void delete(Long id);
    
    // 高级查询操作
    List<ParkingUsage> findByCommunityId(Long communityId);
    
    Page<ParkingUsage> findByCommunityId(Long communityId, Pageable pageable);
    
    List<ParkingUsage> findByParkingId(Long parkingId);
    
    List<ParkingUsage> findByOwnerId(Long ownerId);
    
    List<ParkingUsage> findByVehicleId(Long vehicleId);
    
    List<ParkingUsage> findByOwnerName(String ownerName);
    
    List<ParkingUsage> findByLicensePlate(String licensePlate);
    
    List<ParkingUsage> findByPaymentStatus(String paymentStatus);
    
    List<ParkingUsage> findByUsageType(Integer usageType);
    
    // 组合查询
    List<ParkingUsage> findByCommunityIdAndUsageType(Long communityId, Integer usageType);
    
    List<ParkingUsage> findByCommunityIdAndPaymentStatus(Long communityId, String paymentStatus);
    
    // 高级搜索
    List<ParkingUsage> search(Map<String, Object> params);
    
    Page<ParkingUsage> search(Map<String, Object> params, Pageable pageable);
} 